﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once
#include "GcmpModelInterface.h"
#include "IEventArgs.h"
#include "IDataset.h"



namespace gcmp
{
    /// \brief 文档事件类型
    ///
    /// 
    enum class AutoSaveEvenType : int32_t
    {
        Success,        ///< 成功
        UnknowError,      ///< 未知错误
        DataError      ///< 数据错误
    };

    class IDocument;


    /// \brief  文档事件参数
    ///
    class GCMP_MODEL_INTERFACE_EXPORT IAutoSaveEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IAutoSaveEventArgs, gcmp::IEventArgs);
    public:


        ///  \brief 获取错误信息
        ///
        /// \return 获取错误信息
        virtual const std::string& GetErrorMessageInJson() = 0;

        ///  \brief 获取错误类型
        ///
        /// \return 获取错误类型
        virtual AutoSaveErrorType GetErrorType() = 0;
    };
}

